<%@page import="weaver.conn.RecordSet"%>
<%@page import="com.alibaba.fastjson.JSONObject"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="com.zlgs.cqyf.vote.ConnectionUtil"%>
<%@ page import="java.io.PrintWriter" %>
<%
    response.setCharacterEncoding("UTF-8");
    response.setContentType("application/json; charset=utf-8");
	JSONObject retObject = new JSONObject();
    retObject.put("code", 200);
    retObject.put("msg", "操作成功");
    try {
	    // URL 参数
	    Object id  = request.getParameter("id");                   // 奖项配置ID
		if (null == id) {
			// 终止程序执行-直接finally
			throw new RuntimeException("奖项Id不能为空!");
		}
	    // 数据
	    RecordSet set = new RecordSet();
	    set.executeSql("UPDATE vote_awards set is_del=1,update_time=GETDATE() where id = "+id);
    } catch (Exception e) {
        e.printStackTrace();
        retObject.put("code", -1);
        retObject.put("msg", e.getMessage());
    } finally {
        PrintWriter printWriter = response.getWriter();
    	printWriter.append(retObject.toJSONString());
        if (printWriter != null)  printWriter.close();
    }
%>
 